#include "Object3D.h"

namespace RayTracer
{
    Object3D::Object3D(Vector3D pos, Vector3D dir)
    {
	this->position = pos;
	this->direction = dir;
    }

    Object3D::~Object3D()
    {
    }
		
    void Object3D::Rotate(float xAngle, float yAngle, float zAngle)
    {
	Matrix4x4 rotation = Matrix4x4::CreateRotationMatrix(xAngle, yAngle, zAngle);
	this->position = Matrix4x4::Mul(&rotation, &this->position);
    }

    void Object3D::Translate(float dx, float dy, float dz)
    {
	Matrix4x4 translation = Matrix4x4::CreateTranslationMatrix(dx, dy, dz);
	this->position = Matrix4x4::Mul(&translation, &this->position);
    }
};
